let load_text = document.getElementsByClassName('load_text')[0]

let app_bg = document.getElementsByClassName('app_bg')[0]


let progress = 0

let timer = setInterval(() => {
    progress++
    if (progress > 99) {
        // load_text.style.display = 'none'
        clearInterval(timer)
    }
    app_bg.style.filter = `blur(${scale(progress, 0, 100, 30, 0)}px)`
    load_text.innerText = progress + '%'
    load_text.style.opacity = scale(progress, 0, 100, 1, 0)
}, 100);

/**
 * @Author: kkk
 * @description: 计算缩放
 * @param {*} num 当前进度
 * @param {*} in_min 最小值
 * @param {*} in_max 最大值
 * @param {*} out_min 默认值最大
 * @param {*} out_max 默认值最小
 * @return {*}
 */
const scale = (num, in_min, in_max, out_min, out_max) => {
    return ((num - in_min) * (out_max - out_min)) / (in_max - in_min) + out_min
}